# Contributor: Andrej Kolchin <KAAtheWise@protonmail.com>
# Maintainer: Andrej Kolchin <KAAtheWise@protonmail.com>
pkgname=scc
pkgver=3.3.3
pkgrel=0
pkgdesc="Very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go"
url="https://github.com/boyter/scc"
arch="all"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/boyter/scc/archive/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -o bin/scc
}

check() {
	go test ./...
}

package() {
	install -Dm755 bin/scc -t "$pkgdir"/usr/bin
}

sha512sums="
369a638d719129cf949c592442e75fb791803c1b3a285b01ba6f0edac6794ba4d5b5978e931bbb05503ddf00bfd33a813cde3bbb12164d793e916fbf781e5986  scc-3.3.3.tar.gz
"
